from django.db import models
from utils.BaseModel import BaseModel
# Create your models here.
class Pro(BaseModel):
    name = models.CharField(max_length=32,verbose_name='项目名称')
    position = models.IntegerField(verbose_name='项目位置',default=0)
    link = models.CharField(max_length=32,verbose_name='项目链接',default='')
    class Meta:
        db_table = 'pro'
    def __str__(self):
        return self.name

class Banner(BaseModel):
    title = models.CharField(max_length=32,verbose_name='轮播图标题')
    image = models.ImageField(upload_to='uploads/banner/',verbose_name='轮播图图片')
    link = models.CharField(max_length=32,verbose_name='轮播图链接',default='')
    class Meta:
        db_table = 'banner'
    def __str__(self):
        return self.title
